package com.zhkc.iess.system.controller;

import com.zhkc.iess.system.api.SysUserApi;
import com.zhkc.iess.system.dto.SysUserAddDTO;
import com.zhkc.iess.system.dto.SysUserQueryDTO;
import com.zhkc.iess.system.dto.SysUserResetPwdDTO;
import com.zhkc.iess.system.service.impl.SysUserService;
import com.zhkc.iess.system.vo.SysResourcePermissionVO;
import com.zhkc.iess.system.vo.SysUserVO;
import com.zhkc.wisdom.common.pojo.vo.PageVO;
import com.zhkc.wisdom.common.pojo.vo.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class SysUserController implements SysUserApi {

    @Autowired
    private SysUserService service;


    @Override
    public ResultVO<PageVO<SysUserVO>> pageList(SysUserQueryDTO dto) {
        return ResultVO.success(service.pageList(dto));
    }

    @Override
    public ResultVO<Long> create(SysUserAddDTO dto) {
        return null;
    }

    @Override
    public ResultVO<Void> update(Long id, SysUserAddDTO dto) {
        return null;
    }

    @Override
    public ResultVO<Void> delete(Long id) {
        return null;
    }

    @Override
    public ResultVO<Void> updateStatus(Long id) {
        return null;
    }

    @Override
    public ResultVO<Void> resetPwd(Long id, SysUserResetPwdDTO dto) {
        return null;
    }

    @Override
    public ResultVO<SysUserVO> listByRole(String roleCode) {
        return null;
    }

    @Override
    public ResultVO<List<SysResourcePermissionVO>> getResource() {
        return ResultVO.success(service.getResource());
    }
}
